Fix the double border in windows with a search bar.
authorNikita Churaev <lamefun.x0r@gmail.com>
Wed, 7 Mar 2018 05:39:05 +0000 (08:39 +0300)
committerNikita Churaev <lamefun.x0r@gmail.com>
Wed, 7 Mar 2018 05:54:11 +0000 (08:54 +0300)
Includes applications like GNOME Software and GNOME Documents. The
search bar is a composite widget with a revealer inside it, and when the
content of the revealer is hidden, the border lingers. Changed the CSS
to add style to the content of the revealer instead of the search bar
widget itself.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index 45e5d46a0d1c1c65a8b0c94c74b773154276eca8..7059e37709cb94e6020f09b03b2a492dabc78896 100644 (file)
@@ -1404,7 +1404,7 @@ toolbar {
   border-radius: 0  0 5px 5px;
 }
 
-searchbar,
+searchbar > revealer > *,
 .location-bar {
   @extend %toolbar;
 
@@ -1414,6 +1414,12 @@ searchbar,
   padding: 3px;
 }
 
+// workaround: undo the GTK+ margin and use CSS padding instead
+searchbar > revealer > * {
+  margin: -6px;
+  padding: 6px;
+}
+
 %darkbar {
   border-style: solid;
   border-color: $borders_color;
index 7e94ede7843e7ae070514346d87f76637901e79a..7bc4f7238ea69acf08331bb16388cbcfbfbe1717 100644 (file)
@@ -553,7 +553,7 @@ combobox arrow { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); min-heig
 combobox:drop(active) { box-shadow: none; }
 
 /************ Toolbars * */
-toolbar, .inline-toolbar, searchbar, .location-bar { -GtkWidget-window-dragging: true; padding: 4px; background-color: #33393b; }
+toolbar, .inline-toolbar, searchbar > revealer > *, .location-bar { -GtkWidget-window-dragging: true; padding: 4px; background-color: #33393b; }
 
 toolbar { padding: 4px 3px 3px 4px; }
 
@@ -571,11 +571,13 @@ toolbar:not(.inline-toolbar):not(.osd) switch, toolbar:not(.inline-toolbar):not(
 
 .inline-toolbar { padding: 3px; border-width: 0 1px 1px; border-radius: 0  0 5px 5px; }
 
-searchbar, .location-bar { border-width: 0 0 1px; padding: 3px; }
+searchbar > revealer > *, .location-bar { border-width: 0 0 1px; padding: 3px; }
 
-.inline-toolbar, searchbar, .location-bar { border-style: solid; border-color: #1b1f20; background-color: #2c3133; }
+searchbar > revealer > * { margin: -6px; padding: 6px; }
 
-.inline-toolbar:backdrop, searchbar:backdrop, .location-bar:backdrop { border-color: #202425; background-color: #2c3233; box-shadow: none; transition: 200ms ease-out; }
+.inline-toolbar, searchbar > revealer > *, .location-bar { border-style: solid; border-color: #1b1f20; background-color: #2c3133; }
+
+.inline-toolbar:backdrop, searchbar > revealer > :backdrop, .location-bar:backdrop { border-color: #202425; background-color: #2c3233; box-shadow: none; transition: 200ms ease-out; }
 
 /*************** Header bars * */
 .titlebar:not(headerbar), headerbar { padding: 0 6px; min-height: 46px; border-width: 0 0 1px; border-style: solid; border-color: #0b0c0c; border-radius: 0; background: #2c3133 linear-gradient(to top, #25292b, #2a2e30 2px, #2c3133 3px); box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); }
index 51d4ff4cb3431d473f520316a44bd0c135851e76..cc5d40fd450393eea6f7f2980ffbb08e33af11c7 100644 (file)
@@ -561,7 +561,7 @@ combobox arrow { -gtk-icon-source: -gtk-icontheme("pan-down-symbolic"); min-heig
 combobox:drop(active) { box-shadow: none; }
 
 /************ Toolbars * */
-toolbar, .inline-toolbar, searchbar, .location-bar { -GtkWidget-window-dragging: true; padding: 4px; background-color: #e8e8e7; }
+toolbar, .inline-toolbar, searchbar > revealer > *, .location-bar { -GtkWidget-window-dragging: true; padding: 4px; background-color: #e8e8e7; }
 
 toolbar { padding: 4px 3px 3px 4px; }
 
@@ -579,11 +579,13 @@ toolbar:not(.inline-toolbar):not(.osd) switch, toolbar:not(.inline-toolbar):not(
 
 .inline-toolbar { padding: 3px; border-width: 0 1px 1px; border-radius: 0  0 5px 5px; }
 
-searchbar, .location-bar { border-width: 0 0 1px; padding: 3px; }
+searchbar > revealer > *, .location-bar { border-width: 0 0 1px; padding: 3px; }
 
-.inline-toolbar, searchbar, .location-bar { border-style: solid; border-color: #b6b6b3; background-color: #d9d9d7; }
+searchbar > revealer > * { margin: -6px; padding: 6px; }
 
-.inline-toolbar:backdrop, searchbar:backdrop, .location-bar:backdrop { border-color: #c0c0bd; background-color: #dadad8; box-shadow: none; transition: 200ms ease-out; }
+.inline-toolbar, searchbar > revealer > *, .location-bar { border-style: solid; border-color: #b6b6b3; background-color: #d9d9d7; }
+
+.inline-toolbar:backdrop, searchbar > revealer > :backdrop, .location-bar:backdrop { border-color: #c0c0bd; background-color: #dadad8; box-shadow: none; transition: 200ms ease-out; }
 
 /*************** Header bars * */
 .titlebar:not(headerbar), headerbar { padding: 0 6px; min-height: 46px; border-width: 0 0 1px; border-style: solid; border-color: #91918c; border-radius: 0; background: #f4f4f4 linear-gradient(to top, #d4d4d2, #efefef 2px, #f4f4f4 3px); box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); }